The key features of unreliable packets in DarkNet are:
- Packets are not guaranteed to arrive, some may be discarded.
- Transfer is much faster than reliable.
Due to the above features, we use UDP
for things where speed is important and where we are not too bothered
about whether or not the packet arrives (normally because there are
many of the same type of packet, so if one does not arrive there are
others to take its place).
Here are some example uses for UDP:
- Sending/receiving client positions.
- Sending/receiving client angles.
In DarkNet there are 4 different UDP
modes which determine how DarkNet deals with UDP data. Below each UDP
mode is numbered, this is the number you should pass as a parameter
to mnStartServer.
Note that the server sets the UDP mode and maximum number of operations; connected clients have the same settings for these as the server.
1: Summary of UDP Modes